/* MongoDB schema for Game API model */

var Round = require('./RoundSchema.js').Round,
    mongoose = require('mongoose'),
    Schema = mongoose.Schema;

var GameSchemaModel = new Schema({
    id      : { type: Number, required: true },
    info    : String,
    players : [String],
    types : {
        hint_type  : String,
        guess_type : String
    },
    identifiers : {
        hint_id  : String,
        guess_id : String
    },
    points   : Number,
    rounds   : [Round],
});

var GameSchema = exports.GameSchema = mongoose.model('Game', GameSchemaModel, 'games');
